export default {
  pages: [
    // 路径 + 文件名。文件名不需要添加.js后缀。
    // 路径: pages/index
    // 文件名: index
    'pages/index/index',
  ],
  // 分包
  subPackages: [
    {
      "root": "detail",
      "name": "detail",
      "pages": [
        'pages/detail/detail',
      ]
    },
    {
      "root": "login",
      "name": "login",
      "pages": [
        'pages/login/login',
      ]
    },
    {
      "root": "user",
      "name": "user",
      "pages": [
        'pages/user/user',
      ]
    },
    {
      "root": "publish",
      "name": "publish",
      "pages": [
        'pages/publish/publish',
      ]
    }
  ],
  // 微信小程序预下载
  // 预下载分包行为在进入某个页面时触发
  preloadRule: {
    // 进入index主包, 预加载detail、login分包
    "pages/index/index": {
      "network": "all",
      "packages": ["detail", "login"]
    },
    // 进入login分包, 预加载user分包
    "login/pages/login/login": {
      "network": "all",
      "packages": ["user"]
    },
    // 进入user分包, 预加载publish、detail分包
    "user/pages/user/user": {
      "network": "all",
      "packages": ["publish", "detail"]
    },
  },
  permission: {
    'scope.userLocation': {
      desc: '你的位置信息将用于小程序位置接口的效果展示'
    }
  },
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: 'WeChat',
    navigationBarTextStyle: 'black'
  }
}
